package com.by.controller;

import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.DictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "字典管理")
@RestController
@RequestMapping("/v1")
public class DictController extends BaseController {
    @Autowired
    DictService dictService;


    @ApiOperation("字典配置")
@GetMapping("/dict/type")
    public ResultBean queryDict(@RequestParam(name = "type",required = true) String type){
    List list=dictService.queryDict(type);
    return success("字典列表",list);
    }
}
